package gui;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class AboutPanel extends JPanel
{
    private final JLabel _label;
    private final JButton _backButton;
    
    public AboutPanel( final DasIrcWindow window )
    {
        setLayout( new BorderLayout() );
        
        _label = new JLabel( "Created by Marcus Lundgren" );
        _backButton = new JButton( "Back to chats" );
        
        _backButton.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                window.switchToChatPanel();
            }
        });
        
        add( _label, BorderLayout.CENTER );
        add( _backButton, BorderLayout.WEST );
    }
}
